package com.aids_malaria.http.response;

import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.arch.persistence.room.TypeConverter;
import android.arch.persistence.room.TypeConverters;
import android.support.annotation.NonNull;

import com.aids_malaria.http.request.ConSymptom;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.litesuits.orm.db.annotation.NotNull;
import com.litesuits.orm.db.annotation.Table;
import com.litesuits.orm.db.enums.AssignType;

import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;

@Entity(tableName = "workAreaResponse")
public class WorkAreaResponse implements Serializable {


    /**
     * creating_time : 2020-03-06 12:54:51
     * creator : steven
     * pad_id : 110001
     * village_data : [{"village_code":"150001","village_name":"Conde","xy":"x:1.0,y:1.0"},{"village_code":"150003","village_name":"Micoló","xy":"x:1.0,y:1.0"}]
     * work_mode : 1
     * x1 : 1
     * x2 : 2
     * y1 : 0
     * y2 : 0
     */

//    @PrimaryKey(AssignType.AUTO_INCREMENT)
    @PrimaryKey
    @NonNull
    private int id;
    private String creating_time;
    private String creator;
    private String pad_id;
    private String work_mode;
    private String x1;
    private String x2;
    private String y1;
    private String y2;
    private String county_code;
    private String county_name;
    @TypeConverters(VillageDatConverter.class)
    private List<VillageDataBean> village_data;
    private String village_data_json;
    private String busy_type;

    public String getBusy_type() {
        return busy_type;
    }

    public void setBusy_type(String busy_type) {
        this.busy_type = busy_type;
    }

    public String getVillage_data_json() {
        return village_data_json;
    }

    public void setVillage_data_json(String village_data_json) {
        this.village_data_json = village_data_json;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCreating_time() {
        return creating_time;
    }

    public void setCreating_time(String creating_time) {
        this.creating_time = creating_time;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getPad_id() {
        return pad_id;
    }

    public void setPad_id(String pad_id) {
        this.pad_id = pad_id;
    }

    public String getWork_mode() {
        return work_mode;
    }

    public void setWork_mode(String work_mode) {
        this.work_mode = work_mode;
    }

    public String getX1() {
        return x1;
    }

    public void setX1(String x1) {
        this.x1 = x1;
    }

    public String getX2() {
        return x2;
    }

    public void setX2(String x2) {
        this.x2 = x2;
    }

    public String getY1() {
        return y1;
    }

    public void setY1(String y1) {
        this.y1 = y1;
    }

    public String getY2() {
        return y2;
    }

    public void setY2(String y2) {
        this.y2 = y2;
    }

    public String getCounty_code() {
        return county_code;
    }

    public void setCounty_code(String county_code) {
        this.county_code = county_code;
    }

    public String getCounty_name() {
        return county_name;
    }

    public void setCounty_name(String county_name) {
        this.county_name = county_name;
    }

    public List<VillageDataBean> getVillage_data() {
        return village_data;
    }

    public void setVillage_data(List<VillageDataBean> village_data) {
        this.village_data = village_data;
    }

    @Entity
    public static class VillageDataBean implements Serializable {
        /**
         * village_code : 150001
         * village_name : Conde
         * xy : x:1.0,y:1.0
         */

        private boolean isCheck;
        private String county_code;
        private String village_code;
        private String village_name;
        private String xy;

        public VillageDataBean() {
        }

        public String getCounty_code() {
            return county_code;
        }

        public void setCounty_code(String county_code) {
            this.county_code = county_code;
        }

        public boolean isCheck() {
            return isCheck;
        }

        public void setCheck(boolean check) {
            isCheck = check;
        }

        public String getVillage_code() {
            return village_code;
        }

        public void setVillage_code(String village_code) {
            this.village_code = village_code;
        }

        public String getVillage_name() {
            return village_name;
        }

        public void setVillage_name(String village_name) {
            this.village_name = village_name;
        }

        public String getXy() {
            return xy;
        }

        public void setXy(String xy) {
            this.xy = xy;
        }
    }
}
